<?php

use think\migration\Seeder;

class ControlPlanFromTsinghuaDetailsData extends Seeder
{
    /**
     * 管控 - 清华预案详情
     */
    public function run()
    {
        $table = $this->table('control_plan_from_tsinghua_details');
        $rows  = [
            //预案1-公司1-1#
            [
                'tsinghua_plan_id'      => '1', //清华预案对应的ID
                'tsinghua_start_time'   => '2019-06-14 12:00:00',
                'tsinghua_end_time'     => '2019-06-20 12:00:00',
                'company_id'            => '1',
                'company_so2_emission' =>  '37.17621',
                'company_no2_emission' =>  '4.649523',
                'drain_id'   => '1',
                'drain_so2_emission'   => '4.649523',
                'drain_no2_emission'   => '37.17621',
                'create_time'           => date('Y-m-d H:i:s', time()),
            ],
            //预案1-公司2-1#
            [
                'tsinghua_plan_id'      => '1', //清华预案对应的ID
                'tsinghua_start_time'   => '2019-06-14 12:00:00',
                'tsinghua_end_time'     => '2019-06-20 12:00:00',
                'company_id'            => '2',
                'company_so2_emission' =>  '37.17621',
                'company_no2_emission' =>  '4.649523',
                'drain_id'   => '1',
                'drain_so2_emission'   => '4.649523',
                'drain_no2_emission'   => '37.17621',
                'create_time'           => date('Y-m-d H:i:s', time()),
            ],
            //预案1-公司2-2#
            [
                'tsinghua_plan_id'      => '1', //清华预案对应的ID
                'tsinghua_start_time'   => '2019-06-14 12:00:00',
                'tsinghua_end_time'     => '2019-06-20 12:00:00',
                'company_id'            => '2',
                'company_so2_emission' =>  '37.17621',
                'company_no2_emission' =>  '4.649523',
                'drain_id'   => '1',
                'drain_so2_emission'   => '4.649523',
                'drain_no2_emission'   => '37.17621',
                'create_time'           => date('Y-m-d H:i:s', time()),
            ],
        ];
        $table->insert($rows)->save();
    }
}